package cn.anecansaitin.industrialization_expansion.common.cap;

import cn.anecansaitin.industrialization_expansion.api.common.cap.IModuleStorage;
import net.minecraft.nbt.INBT;
import net.minecraft.util.Direction;
import net.minecraftforge.common.capabilities.Capability;
import net.minecraftforge.common.capabilities.CapabilityInject;
import net.minecraftforge.common.capabilities.CapabilityManager;

import javax.annotation.Nullable;

public class CapabilityModuleStorage {
    @CapabilityInject(IModuleStorage.class)
    public static Capability<IModuleStorage> MODULE_STORAGE;

    public static void register() {
        CapabilityManager.INSTANCE.register(IModuleStorage.class, new Capability.IStorage<IModuleStorage>() {
            @Nullable
            @Override
            public INBT writeNBT(Capability<IModuleStorage> capability, IModuleStorage instance, Direction side) {
                return null;
            }

            @Override
            public void readNBT(Capability<IModuleStorage> capability, IModuleStorage instance, Direction side, INBT nbt) {

            }
        }, () -> null);
    }
}
